//
//  AMRequestFactory.m
//  WeiDu_1_0
//
//  Created by foguo-mac-1 on 01/07/16.
//  Copyright (c) 2016 WeiDu Energy Tech. All rights reserved.
//

#import "HORequestFactory.h"
static HORequestFactory *_instance;

@implementation HORequestFactory

+ (HORequestFactory *)sharedInstance
{
	@synchronized(self)
	{
   	 	if(_instance == nil)
    	{
        	_instance = [[HORequestFactory alloc] init];
   		 }
	}
    return _instance;
}

- (instancetype)init
{
    if(self = [super init])
    {
        sequence = 1000;
    }
    return self;
}

- (HOBaseRequestEntity *)getRequest:(NSString *)action
{
    sequence ++;
    
    HOBaseRequestEntity *request = [[[HOBaseRequestEntity alloc] init] autorelease];
    request.action = action;
    request.sequence = sequence;
    return request;
}
@end
